package com.hundun.vision.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ：RuoChen
 * @date ：16:09 2024/11/29
 * @description：订单方向
 */
@AllArgsConstructor
@Getter
public enum OrderSide {
    BUY("BUY", "买入"),
    SELL("SELL", "卖出");

    private String side;

    private String description;

    public static String getDescription(String type) {
        for (OrderSide orderSide : OrderSide.values()) {
            if (orderSide.getSide().equals(type)) {
                return orderSide.getDescription();
            }
        }
        return null;
    }
}